<?php
/**
@prefix : <http://purl.org/net/ns/doas#> .
<> a :PHPScript;
 :shortdesc "a default site template.";
 :author [:name "Logue"; :homepage <http://logue.be> ];
 :license <http://www.gnu.org/licenses/gpl-3.0.html>;
 :dependencies "none" .
*/
// Lorelei Copyright (C) 2008 by Logue
// Copyright (c)2008 Logue <http://logue.be/> All rights reserved.

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

$ua = $_SERVER['HTTP_USER_AGENT'];

if (!(ereg("Windows",$ua) && ereg("MSIE",$ua)) || ereg("MSIE 7",$ua)) {
	echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://dublincore.org/documents/dcq-html/">
	<?php echo $html->charset() . "\n"; ?>
	<meta http-equiv="Content-Script-Type" content="text/javascript" />
	<meta http-equiv="Content-Style-Type" content="text/css" />
	<meta name="DC.format" scheme="DCTERMS.IMT" content="text/html" />
	<meta name="DC.type" scheme="DCTERMS.DCMIType" content="Text" />
	<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
	<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
	<script type="text/javascript" src="<?php echo $this->webroot; ?>js/dojo/dojo/dojo.js" djConfig="<?php if(env('SERVER_ADDR') == '127.0.0.1'):?>isDebug: true, <?php endif; ?>parseOnLoad: true, preventBackButtonFix:false, modulePaths:{'lorelei': '<?php echo $this->webroot; ?>js/lorelei'}"></script>
	<style type="text/css"><!--
		@import "<?php echo $this->webroot; ?>js/dojo/dijit/themes/nihilo/nihilo.css";
		@import "<?php echo $this->webroot; ?>js/dojo/dojo/resources/dojo.css"
--></style>
	<link rel="alternate" href="http://mabinogi.logue.be/articles/rss" type="application/rss+xml" title="RSS" />
	<link rel="contents" href="<?php echo $this->webroot; ?>" title="Lorelei" />
	<link rel="help" href="<?php echo $this->webroot . 'pages/about'; ?>" title="<?php echo __('About',true); ?>" />
	<link rel="index" href="<?php echo $this->webroot . 'articles'; ?>" title="<?php echo __('Articles',true); ?>" />
	<link rel="search" href="<?php echo $this->webroot . 'articles/search'; ?>" title="<?php echo __('Search',true); ?>" />
<?php 
	echo "\t".$javascript->link('http://www.google.com/jsapi?key=ABQIAAAAHP7d9QfO-s_zel2_oYqUTxSPh9c4FUlD3z8dh_jG8urwqs4gYBRFQlf8__o04tGJ5hH2x_hF-KXGpA')."\n";
	echo "\t".$javascript->link('http://s.hatena.ne.jp/js/HatenaStar.js')."\n";
	echo "\t".$html->meta('icon'). "\n";
	echo "\t".$html->css('cake.generic'). "\n";
	echo "\t".$html->css('style'). "\n";
	echo "\t".$html->css('lorelei'). "\n";
	echo $scripts_for_layout;
	$head->jsblock('Hatena.Star.Token = \'618b55c4b49475c0db02c59dbda40883ed8ab696\';');
	if (isset($head)) echo $head->registered();
?>
	<title><?php echo $title_for_layout;?> - Lorelei: <?php echo __('Mabinogi MML posting site.',true); ?></title>
</head>
<?php flush(); ?>
<body class="nihilo">
<!-- ******************************************** HEADER *************************************** -->
	<div id="header">
		<?php echo $html->image("logo.gif",array('alt'=>'logo','style'=>'float:left')); ?>
		<h1><?php echo $html->link('Lorelei', '/');?></h1>
		<div id="sub"><a href="http://mabinogi.logue.be/">Lorelei: the Mabinogi <acronym title="Music Macro Language">MML</acronym> Posting Site.</a></div>
		<div id="sub2">http://mabinogi.logue.be/</div>
	</div>
<!-- ****************************************** NAVIGATION ************************************* -->
	<div id="nav">
		<?php echo $this->renderElement('nav'); ?>
	</div>

	<div id="base">
		<div id="wrap">
<!-- ******************************************* CONTENT *************************************** -->
			<div id="contents">
				<div id="c_pad">
					<?php if ($session->check('Message.flash')) $session->flash(); ?>
<!-- Start Main -->
<?php echo $content_for_layout;?>
<!-- End Main -->
				</div>
			</div>
<!-- ****************************************** SIDEMENU ************************************** -->
			<div id="side">
				<?php echo $this->renderElement('side'); ?>
			</div>
<!-- ******************************************* FOOTER *************************************** -->
			
			<div id="amazon"><?php
echo $javascript->codeBlock('amazon_ad_tag = "prologueinfo-22"; amazon_ad_width = "468"; amazon_ad_height = "60"; amazon_ad_logo = "hide"; amazon_ad_link_target = "new"; amazon_color_border = "B3BDA8"; amazon_color_background = "F2F2F2"; amazon_color_text = "333333"; amazon_color_link = "777777"; amazon_color_price = "3F3F3F"; amazon_color_logo = "555555";');
echo $javascript->link('http://www.assoc-amazon.jp/s/ads.js');
?></div>
		</div>

		<div id="f_menu">
			<?php echo $this->renderElement('f_menu'); ?>

			<!--　ここから　↓↓　無料でお使いの方は、ＰＲ広告を削除しないでください　↓↓　-->
			<div id="pr">【PR】<a href="http://www.megapx.com/" title="ホームページ製作・ウェブデザイン" target="_blank">ホームページ制作</a>　<a href="http://www.s-hoshino.com/" title="無料素材・無料HTMLテンプレート" target="_blank">フリー素材</a></div>
			<!--　ここまで　↑↑　無料でお使いの方は、ＰＲ広告を削除しないでください　↑↑　-->
		</div>

		<address>
			<strong><a href="http://lorelei.googlecode.com/">Lorelei</a></strong> Copyright &copy;2008-2010 <?php echo $html->link('Logue', 'http://logue.be/'); ?> All rights reserved. / 
			Powered by <?php echo $html->link('CakePHP', 'http://cakephp.org/');?> v<?php echo Configure::version()?> + <?php echo $html->link('The Dojo Toolkit', 'http://dojotoolkit.org/');?> v1.5.0<br />
			<strong><?php echo $html->link('Mabinogi', 'http://www.mabinogi.jp/'); ?>&trade;</strong> 
			Developed by <?php echo $html->link('devCat', 'http://mabinogi.com/jobs/'); ?> / 
			Copyright &copy;2003-2010 <?php echo $html->link('Nexon Corporation', 'http://www.nexon.com/'); ?>, 
			and <?php echo $html->link('Nexon Japan', 'http://www.nexon.co.jp/'); ?> All Rights Reserved.
		</address>
	</div>

<?php echo $cakeDebug ?>

<?php if(env('SERVER_ADDR') != '127.0.0.1') :?>
<script type="text/javascript">
//<![CDATA[
var disqus_shortname = 'lorelei';
(function () {
	var s = document.createElement('script'); s.async = true;
	s.src = 'http://disqus.com/forums/lorelei/count.js';
	(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-11445748-8']);
_gaq.push(['_trackPageview']);
 
(function() {
	var ga = document.createElement('script');
	ga.type = 'text/javascript';
	ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0];
	s.parentNode.insertBefore(ga, s);
})();
// ]]></script>
<?php endif ?>

</body>
</html>
